<!DOCTYPE html>
<html>
<head>
<title></title>
<#include '/modules/sys/header.ftl'>


</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
		<@shiro.hasPermission name = 'fielddictionary:save'> 

            <button class="layui-btn" @click="add" type="button"><i class="layui-icon">&#xe61f;</i> 新 增</button>
		</@shiro.hasPermission>
            <button class="layui-btn" id="searchSubmit" @click="query"><i class="layui-icon">&#xe615;</i>查 询</button>

		<@shiro.hasPermission name = 'fielddictionary:update'>
            <button class="layui-btn layui-btn-normal" type="button" @click="update"><i class="layui-icon">&#xe642;</i>编辑</button>
		</@shiro.hasPermission>
		<@shiro.hasPermission name = 'fielddictionary:delete'>
            <button class="layui-btn layui-btn-danger" type="button" @click="del"><i class="layui-icon">&#xe640;</i>删除</button>
			</@shiro.hasPermission>

		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-2 control-label">字段名</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="fieldDictionary.field" placeholder="字段名"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">字段名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="fieldDictionary.fieldName" placeholder="字段名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">字段类型</div>

			   	<div class="col-sm-10">
                    <select id="sendSybol" v-model="fieldDictionary.fieldType">
                        <option  v-for="fieldType  in fieldTypeList" name="fieldType" :value="fieldType.value" >{{fieldType.name}}</option>
                    </select>
                    <#--<input type="text" class="form-control" v-model="fieldDictionary.fieldType" placeholder="字段类型"/>-->
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">指定表</div>
			   	<div class="col-sm-10">
                    <select  v-model="fieldDictionary.tableName">
                        <option  v-for="tableName  in tableNameList" name="tableName" :value="tableName.value" >{{tableName.name}}</option>
                    </select>
			      <#--<input type="text" class="form-control" v-model="fieldDictionary.tableName" placeholder="指定表"/>-->
			    </div>
			</div>
            <div class="form-group">
                <div class="col-sm-2 control-label">设置</div>
                <div class="col-sm-10">
                    <input type="checkbox"   v-model="fieldDictionary.flagRequired">是否必填
                    <input type="checkbox"   v-model="fieldDictionary.flagJudg">是否作为判断条件
                </div>
            </div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
                <button class="layui-btn" type="button" @click="saveOrUpdate" >保存</button>
                <button class="layui-btn layui-btn-warm" type="button" @click="reload" style="margin-left: 30px">返回</button>
			</div>
		</form>
	</div>
</div>

<script src="${siteurl}/js/sys/fielddictionary.js?_${.now?long?c}"></script>
</body>
</html>